package JAVA基础01.数组;

//判断数组里 最大值
public class text {
    public static void main(String[] args) {
        int[] a = {2, 4, 6, 3, 5, 9};
        int max = a[0];
        for (int i = 0; i < a.length; i++) {
            if (a[i] > max) {
                max = a[i];
            }
        }
        System.out.println("最大值是" + max);
    }
}
